package cn.buk.qms.service;

import cn.buk.tms.dto.*;
import cn.buk.tms.entity.order.flight.FlightRefundOrder;

import java.time.LocalDate;
import java.util.Date;
import java.util.List;

/**
 * @author yfdai
 */
public interface ReportService {

    /**
     * 机票销售月报
     *
     * @param enterpriseId 企业id
     * @param userId 用户id
     * @param beginDate 开始日期
     * @param endDate 截止日期
     * @param supplierId 供应商id
     * @param customerId 客户id
     * @return 机票统计结果
     */
    List<ReportFlightTicketDto> searchFlightMonthlySale(int enterpriseId, int userId, Date beginDate, Date endDate, int supplierId, int customerId);
    List<ReportFlightTicketDto> searchFlightMonthlySale(int enterpriseId, String username, Date beginDate, Date endDate, int supplierId, int customerId);

    /**
     * 退票月报
     */
    List<ReportFlightRefundDto> searchFlightRefundMonthly(int enterpriseId, int userId, Date beginDate, Date endDate, int supplierId, int customerId);
    List<ReportFlightRefundDto> searchFlightRefundMonthly(int enterpriseId, String username, Date beginDate, Date endDate, int supplierId, int customerId);

    /**
     * 改签的月报
     */
    List<ReportFlightChangeDto> searchFlightChangeMonthly(int enterpriseId, int userId, Date beginDate, Date endDate, int supplierId, int customerId);
    List<ReportFlightChangeDto> searchFlightChangeMonthly(int enterpriseId, String username, Date beginDate, Date endDate, int supplierId, int customerId);

    /**
     * vas月报
     */
    List<ReportVasDto> searchVasMonthly(int enterpriseId, int userId, Date beginDate, Date endDate, int supplierId, int customerId);
    List<ReportVasDto> searchVasMonthly(int enterpriseId, String username, Date beginDate, Date endDate, int supplierId, int customerId);

    /**
     * 酒店预订月报
     */
    List<ReportHotelDto> searchHotelMonthly(int enterpriseId, int userId, Date beginDate, Date endDate, int supplierId, int customerId);
    List<ReportHotelDto> searchHotelMonthly(int enterpriseId, String username, Date beginDate, Date endDate, int supplierId, int customerId);

    /**
     * 火车票月报
     */
    List<ReportTrainDto> searchTrainMonthly(int enterpriseId, int userId, Date beginDate, Date endDate, int supplierId, int customerId);
    List<ReportTrainDto> searchTrainMonthly(int enterpriseId, String username, Date beginDate, Date endDate, int supplierId, int customerId);

    /**
     * 退票单的统计
     */
    List<FlightRefundOrder> searchMonthlyRefundOrder(int enterpriseId, int userId, Date beginDate, Date endDate, int supplierId);

    List<ReportStatisticDto> statDailySale(int enterpriseId, int userId, LocalDate beginDate, LocalDate endDate);

    /**
     * 统计月销售
     * @param enterpriseId
     * @param userId
     * @param beginDate
     * @param endDate
     * @return
     */
    List<ReportStatisticDto> statMonthSale(int enterpriseId, int userId, LocalDate beginDate, LocalDate endDate);

    // 根据支付方式统计支付出去的金额

    List<ReportStatisticDto> statAmountByPaymentMethod(int enterpriseId, int userId, int dateType, Date beginDate, Date endDate);

    List<ReportStatisticDto> statAmountBySupplier(int enterpriseId, int userId, int dateType, Date beginDate, Date endDate);

    List<ReportStatisticDto> statFlightMonthSaleByOp1(int enterpriseId, int userId, Date beginDate, Date endDate);

    List<ReportStatisticDto> statFlightMonthSaleByOp2(int enterpriseId, int userId,  Date beginDate, Date endDate);


    /**
     * 根据销售员统计
     * @param enterpriseId
     * @param userId
     * @param beginDate
     * @param endDate
     * @return
     */
    List<ReportStatisticDto> statMonthSaleBySalesman(int enterpriseId, int userId, Date beginDate, Date endDate);

    /**
     * 航空公司月统计
     * @param enterpriseId
     * @param beginDate
     * @param endDate
     * @return
     */
    List<ReportStatisticDto> statMonthSaleByAirlines(int enterpriseId, Date beginDate, Date endDate);

    /**
     * 自动提示每月未付款金额前10的客户
     */
    void autoAlertMonthlyUnpaidTop10();

    /**
     * 自动发送指定日期的TRP数据
     * @param enterpriseId
     * @param sellDate
     */
    void autoAlertTprStat(int enterpriseId, Date sellDate);

    /**
     * 自动提示没有任何业务记录的客户
     * @param enterpriseId
     * @param maxDays
     */
    void autoAlertNoBusinessCustomer(int enterpriseId, int maxDays);

    /**
     * 自动禁用一段时间没有采购记录的客户
     * @param enterpriseId
     * @param maxDays
     * @param username
     */
    void autoDisableCustomers(int enterpriseId, int maxDays, String username);

    /**
     * 目前仅供开发用
     * 自动停用一段时间没有采购记录的供应商
     * @param enterpriseId
     * @param maxDays
     * @param username
     */
    void autoDisableSuppliers(int enterpriseId, int maxDays, String username);



}
